Hệ thống quản lý ngân hàng máu trong php

1 <?php
2 $id = $_GET[
'id'];
3 if
(isset($_POST['yesBtn'])) {
4     require_once
'php/DBConnect.php';
5     $db =
new DBConnect();
6     $id = $_POST[
'id'];
7     $flag = $db->
remove($id);
8
9     
if ($flag) {
10         header(
"Location: http://localhost/BDManagement/admin/employee.php");
11     }
12 }

13 if
(isset($_POST['noBtn'])) {
14     header(
"Location: http://localhost/BDManagement/admin/employee.php");
15 }
16
17 $title =
"Remove Employee";
18 include
'layout/_header.php';
19 ?>
20
21 <div
class="container">
22     <div
class="row">
23         <div
class="col-md-3"></div>
24         <div
class="col-md-6">
25             <div
class="panel panel-danger">
26                 <div
class="panel-heading">
27                     <h5>Are you sure you want to
remove this employee from the database!!!</h5>
28                 </div>
29                 <div
class="panel-body">
30                     <center>
31                         <div
class="form-group">
32                             <form method=
"post" action="delete.php">
33                                 <input type=
"hidden" name="id" value="<?= $id; ?>" />
34                                 <button
class="btn btn-danger btn-lg" type="submit" name="yesBtn">YES</button>
35                                 <button
class="btn btn-success btn-lg" type="submit" name="noBtn">NO</button>
36                             </form>
37                         </div>
38                     </center>
39                 </div>
40             </div>
41         </div>
42         <div
class="col-md-3"></div>
43     </div>
44 </div>
45
46 <?php include
'layout/_footer.php'; ?>


Gõ tìm kiếm nhanh...